<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

defined('_JEXEC') or die('Retricted Access');

global $option, $jbconfig;
$item = $this->item;
$product_type = JRequest::getVar('product_type');
  if (strtolower($item->product_type)=='s')
	$product_type_name = 'Subscription';
elseif (strtolower($item->product_type)=='p')
	$product_type_name = 'Posting Plan';
else 
	$product_type_name = 'Credit';
$customerDetail = $this->customerDetail;

$editor =& JFactory::getEditor();
$subscription_title = JRequest::getVar('subscription_title');

$user = JFactory::getUser();

$paymentObject = get_payment_gateways();
$item_title = JRequest::getVar('item_title');
?>
<div class="moduletable job-box">	

<div id="jobboard-content">
	<h3>
		<?php echo JText::_('INVOICE')?>
	</h3>
	<table class="tabledata invoice-details">
		<tr class="first">
			<td width="50%" class="first">
				<b>
					<?php echo JText::_('BILL TO')?>
				</b>
			</td>
			<td width="50%" class="last">
				<b>
					<?php echo JText::_('SHIP TO')?>
				</b>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo $user->name; ?>
			</td>
			<td class="last">
				<?php echo $jbconfig['payment']->get('sys_invoice_username'); ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('Company')?>: <?php echo $customerDetail->company; ?>
			</td>
			<td class="last">
				<?php echo JText::_('Company')?>: <?php echo $jbconfig['payment']->get('sys_invoice_company'); ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('Email')?>: <?php echo $user->email; ?>
			</td>
			<td class="last">
				<?php echo JText::_('Email')?>: <?php echo $jbconfig['payment']->get('sys_invoice_email'); ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('Phone')?>: <?php echo $customerDetail->tel; ?>
			</td>
			<td class="last">
				<?php echo JText::_('Phone')?>: <?php echo $jbconfig['payment']->get('sys_invoice_phone'); ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('Location')?>: <?php echo $customerDetail->name; ?>
			</td>
			<td class="last">
				<?php echo JText::_('Location')?>: <?php echo $jbconfig['payment']->get('sys_invoice_location'); ?>
			</td>
		</tr>
	</table>
	<br/>
	<table class="tabledata invoice-details" style="width:50%">
		<tr>
			<td class="first">
				<?php echo JText::_('INVOICE NO')?>: 
			</td>
			<td>
				<?php echo $item->id; ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('INVOICE TYPE')?>: <?php echo JText::_($product_type_name); ?>  <br />
			</td>
			<td class="last">
				<?php echo JText::_($product_type_name); ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('PRODUCT NAME')?>:
			</td>
			<td class="last">
				<?php echo $item_title; ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('DATE')?>: 
			</td>
			<td>
				<?php echo generateDate($item->created_date); ?> <br />
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('AMOUNT')?>: 
			</td>
			<td class="last">
				<?php echo $item->amount; ?>
			</td>
		</tr>
		<tr>
			<td class="first">
				<?php echo JText::_('STATUS')?>: 
			</td>
			<td class="last">
				<?php echo $item->completed?JText::_("Paid"):JText::_("Not Paid"); ?>
			</td>
		</tr>
	</table>
							
</div>	
</div>